echo "{\"jsonrpc\":\"2.0\",\"method\":\"getCounters\",\"params\":{\"sql\":\"$1\"},\"id\":123}" | nc 10.10.50.137 8332 > .tmp
if fgrep -q "[[" .tmp
then
    cat .tmp | sed -e "s/\],\[/\],\n\[/g" | sed -e "s/\[\[/\[\n\[/g" | sed -e "s/\]\]/\]\n\]/g"
else
    cat .tmp
fi
#localhost
